home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1995
/
MacHack 1995.toast
/
Presentations
/
Presentations ’91
/
DAL Files
/
DALtool 6⁄6 (System 7.x)
/
DalDemo.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-06-02
|
1KB
|
57 lines
#include "DalDemo.h"
/* Global vars */
Boolean gDone, gWNEImplemented;
EventRecord gTheEvent;
MenuHandle gAppleMenu, gFileMenu, gEditMenu;
CharsHandle gInText;
Rect gDragRect;
Rect gInRect = {22, 43, 160, 400},
gInScrollBarRect = {22,404,160,420},
gOutRect = {165, 43, 340, 400},
gOutScrollBarRect = {165,404, 340, 420};
int gNewWindowLeft = WINDOW_HOME_LEFT, gNewWindowTop = WINDOW_HOME_TOP;
int gLinesInFolder;
Str255 gNodename, gUsername, gPassword;
char dirty;
/*** main ***/
main()
{
ToolBoxInit();
MenuBarInit();
SetUpDragRect();
MaxApplZone();
GlobalVarInit();
MainLoop();
}
/*** MainLoop ***/
MainLoop()
{
RgnHandle cursorRgn;
Boolean gotOne;
cursorRgn = NewRgn();
while (!gDone)
{
if (gWNEImplemented)
gotOne = WaitNextEvent(everyEvent, &gTheEvent, MIN_SLEEP, cursorRgn);
else
{
SystemTask();
gotOne = GetNextEvent(everyEvent, &gTheEvent);
}
AdjustCursor(gTheEvent.where, cursorRgn);
if (gotOne)
HandleEvent();
else
HandleIdle();
}
}